Repository navigation
fix(metadata-protocol)!: a save naming no package at a bundle member only the dependent holds writes the row-held base's row the bare read addresses - #37069
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…t-only member Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
… the dependent holds Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…lows the row-held base Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…er a forwarding call Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 6f38ede00f36b2f837085843a4515610432571ce && git checkout 6f38ede00f36b2f837085843a4515610432571ce
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 08bf7d2a41a754c601af90281446acf38c3169ec 344fc148d28a5cbbb1ad4ba7cddcdca97d372a17 && git checkout -B drift-repro 08bf7d2a41a754c601af90281446acf38c3169ec && git merge --no-ff 344fc148d28a5cbbb1ad4ba7cddcdca97d372a17
node scripts/docs-audit/affected-docs.mjs --json 08bf7d2a41a754c601af90281446acf38c3169ec
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAj3FYe91JCMQZPS88h Final green head for review, 2026-11-25T10:22Z: |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj 席位核对L1 · ACCEPT · 2026-11-25T10:25Z · head
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract-review-claim: session_01J8VVAo7qz23KxTeCEv1faj · head db0a77a · 2026-11-25T10:26Z L1-c (L1 ACCEPT 7159693982) runs the owed |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract reviewServed-tier: Face: narrowing ( ① Derived judgments
② Semver level
The FROM/TO list names the REST
③ Boundary flags
④ Design judgmentS1 (should-fix) — the package-unbound draft at the cell is moved, undeclared, unpinned, and the bare discard's receipt denies a stored draft.
No must-fix. Nits (no effect on correctness or the contract; none needs a fix on this head):
Controls, as asked: the canonical member both hold ( Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj The brief L1-c handed its isolated BriefContract review brief — PR #37069 @
|
…he dependent-only member A bare draft address naming the package-unbound draft (key null) over a member whose active row only the dependent holds is left as main gives it: the bare draft read serves it, the bare publish promotes it into the dependent's row, the bare discard removes it, and the bare draft save adopts it rather than writing a second draft bound to the base. One predicate, draftAddressFollowsRowHeldBase, is asked by the draft doors' address and the draft save's follow. The changeset lists the sub-cell under "Not moved" and its banner names a base holding a row of any other member. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…raft at the dependent-only member Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
|
repo:objectstack#2 · huangyiirene · session_01J8VVAj3FYe91JCMQZPS88h Final green head for the delta reviews, 2026-11-25T12:26Z: |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj 席位核对L1 · ACCEPT (delta) · 2026-11-25T12:27Z · head
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract-review-claim: session_01J8VVAo7qz23KxTeCEv1faj · head ae5ffb3 · 2026-11-25T12:28Z Delta review of S1 (record 7159864456) on the patch-round head, by the same isolated |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract reviewServed-tier: Delta review on the new head, after record 7159864456 at S1: closed ① Derived judgments
② Semver levelUnchanged and still right: ③ Boundary flags
④ Design judgmentS2 (should-fix) — at the kept sub-cell the bare draft save answers 200 and writes a draft the next bare draft door no longer reaches. With a package-unbound draft at the member over the dependent's lone active row, the save's follow now declines and the repository adopts that draft into the dependent ( No must-fix. Nits N1 to N4 of the prior record: unchanged by this delta, no fix needed on this head (N2 still wants the cell added to #35529 or its own card). No new nit. The four new pins: each lays the state through the real path (a bare draft save while no package holds the member, then the dependent's row) and asserts rows per door; the read pin asserts subject and package. They hold S1's sub-cell as on Implemented-by: VERDICT: PASS |
…nt-only member to the base's draft address The bare draft doors and the draft save's follow take the row-held base's draft address over a stored package-unbound draft too, so the bare draft save writes the base's draft (the package-unbound draft untouched) and the bare draft read reads back what was saved. The bare draft discard with no base draft answers the receipt the discard naming the base answers, naming the package-unbound draft still stored. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…t at the base's draft address The changeset moves that sub-cell from "Not moved" into its FROM/TO. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
…kage-unbound draft with no base draft Measured: with no base draft at the member, the draft read naming no package and the one naming the base both serve the package-unbound draft. The wrapper's docblock and the changeset said no door acted on it; the pin now holds the bare read equal to the named one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h
|
repo:objectstack#2 · huangyiirene · session_01J8VVAj3FYe91JCMQZPS88h Final green head for the round-2 delta reviews, 2026-11-25T15:01Z: |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj 席位核对L1 · ACCEPT (delta, round 2) · 2026-11-25T15:03Z · head
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract-review-claim: session_01J8VVAo7qz23KxTeCEv1faj · head 344fc14 · 2026-11-25T15:04Z Delta review of S2 (record 7162492514) on the round-2 head, by the same isolated |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAo7qz23KxTeCEv1faj Contract reviewServed-tier: Second delta review, after records 7159864456 ( S1: closed ① Derived judgments
② Semver levelUnchanged and right: ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
The test: pins (i) to (iv) lay the sub-cell through the real path and compare bare with the request naming the base on rows, on code and status, and for the discard on the whole receipt including its message. Nits of record 7159864456, status on this head (none needs a fix here):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc 维护者速读
席位意见:ACCEPT(L1-c 7166246625),请审批人批准。 席位核对ACCEPT · repo:objectstack#2 · head
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc Approval requested on head |
Requested by Irene · project thread
Fixes #35524
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — the moved cell is an authored (row-held) base with an email_template locale only its dependent stores; no skills/** or content/docs page teaches where a save naming no package lands there, and skills/objectstack-platform/SKILL.md's customization paragraph covers the code-shipped base, whose bare save this diff leaves unchanged (pinned in the new test's controls); the spec packageId sentence is #35529's
维护者速读
What changes
At a named non-canonical member of a bundled type's name no package ships (today
email_template, e.g.fr-FR), where an authored base package holds a stored row of the item at some member (its canonical member, or another one such asde-DE) and only a package declaring that base holds a row of the member, the read naming no package takes the base's address (rowHeldBaseAddressOf, the S1-guarded arm; unchanged, pinned inmeta-disabled-holder-served-stack.test.tsM1, M2, S2) and answers 404. The doors naming no package that write or address that member's draft now resolve the same address:packagelessRowHeldBaseAddress(protocol-save.ts) also answers the base where the member's active rows are bound to exactly one package, that package is not the base, and the read's own judgment names the base (rowHeldBaseAddressOf, asked, not copied). Two or more holders answer exactly as before (metadata-protocol: with a bundled base and a dependent both holding a member, the bare write doors still answer 409 naming both while the bare read now answers the base #34681).packagelessDraftAddress, behind the draft save, the strict draft read, the per-item publish and the draft discard) is wrapped by the newpackagelessRowHeldBaseDraftAddress: at this cell it answers the base's draft, promoted into the base's row. The draft save sets the base as its package (the repository otherwise resolves its own write head), as the metadata-protocol: with a bundled base and a dependent both holding a member, the bare write doors still answer 409 naming both while the bare read now answers the base #34681 follow arm does, so the named-base rule and the late override re-judgment judge the base.key === null: a package-unbound draft stored at the member with no draft of the dependent beside it, as a bare draft save writes it while no package holds the member), the wrapper still answers the base's address (noneuntil the base holds a draft there), and the draft save's follow still names the base. One predicate,draftAddressFollowsRowHeldBase(nowinto !== null), is asked by both, so they cannot part. The draft save passes the base to the repository, so the orphan-draft adoption (a save naming no package) does not run: the package-unbound draft stays untouched, as the save naming the base leaves it. Under the S1 exemption the bare draft save adopted that draft into the dependent, after which the bare draft read missed the draft just saved (S2).protocol-diff-delete-load.ts): with no base draft it answers the receipt the discard naming the base answers, naming the package-unbound draft still stored (receiptPackageId), neverNo pending draft for TYPE/NAME.while a draft is stored. Only the moved address isnonewith a package-unbound draft stored (packagelessDraftAddressotherwise makes that draft the address itself), so no other cell's receipt changes.Ruling route: the write follows the read (epic ruling 6781691009, 「a write resolves its address exactly as the read at the same address resolves it」; #34348 ruling (b), 「reads and writes give the same answer」). The read is not changed.
FROM to TO (BREAKING, the narrowing arm):
PUT, in process),active: the dependent's row silently updated, read after it 404 (or 409) → the base's row written at the member, as?package=BASEwrites it; the dependent's row byte-unchanged; read after it 200 at the base.?package=BASE.404 NO_DRAFTnaming that draft; discard removed it →200receipt that discards nothing and names the remaining draft. Both equal the same request naming the base.404 NO_DRAFTand bare discard a200receipt naming the package-unbound draft as still stored, all three equal to?package=BASE.Files:
packages/metadata-protocol/src/protocol-save.ts(the helper's one-holder arm, the publish-mode and draft-mode save address, the new draft-address wrapper),packages/metadata-protocol/src/protocol-diff-delete-load.ts(the bare discard's receipt at the package-unbound sub-cell),packages/metadata-protocol/src/protocol.ts(the facade'spackagelessDraftAddressforwards through the wrapper; still one forwarding call,check:facade-delegation-onlygreen). Pins:packages/runtime/src/domains/meta-bare-save-dependent-only-member-35524.test.ts(new, named for this card, the #34681 fixture shape). Changeset:.changeset/35524-bare-save-follows-base-dependent-member.md(@objectstack/metadata-protocolpatch, both declaration lines, BREAKING banner, ADR-0087 dispositionnot-required (no-migration-prescription)).No spec touch: the save request's
packageIddescription's row-held-base exception sentence stays true (it covers a member the base and the dependent both hold). Its earlier sentence, "anactivesave then writes the row of the one package the item's active rows are bound to", now has this cell as a second exception; that text is left to sibling card #35529 (see Acceptance notes).Declarations:
Clause-②: no (narrowing)because a published accept set narrows (the bare publish of the dependent's lone draft at this member moves from 200 to 404NO_DRAFT) and what a bare write lands in moves (the dependent's row → the base's row), the epic ruling's "D's row silently updated → E's row (narrowing)" shape.Metadata-protocol: none: no key, accepted value or meaning of authored metadata moves; what moves is the row a request naming no package addresses, as PR #35450 declared for the sibling move.Read first (by risk):
protocol-save.ts,packagelessRowHeldBaseAddress: the new equalityaddress.candidates.includes(base) === address.candidates.length > 1(two or more: the base among them; one: the base is not that one).protocol-save.ts,packagelessRowHeldBaseDraftAddress,draftAddressFollowsRowHeldBase(into !== null) and the draft save's widened follow condition that asks it;protocol-diff-delete-load.ts,receiptPackageId(the bare discard's receipt over a package-unbound draft at the base's address).protocol.ts, the facade'spackagelessDraftAddress, now the one resolution every bare draft door shares.Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-bare-save-dependent-only-member-35524.test.tsafter building@objectstack/metadata-protocol; expectTests 10 passed (10).Tests
The card's 3-step sequence, measured on main a73edb3 and on this head (booted kernel, real protocol and sqlite store)
Fixture: authored WA holds
en-US, authored WD (declares WA) holdsfr-FR, sameemail_templatename.GET ?member=fr-FRPUTfr-FR, no packageGET ?member=fr-FRWhy step 3 answered 409 on main: only where the rows were stored after boot. The registry then held no row of WA's; the save's registry write-through registered WD's fr-FR item, so the registry named WD the name's one holder, and the read, at the base's address, was refused by the exact-qualifier judgment ("not held by package WA ... held by package WD").
?package=WA&member=fr-FRanswered the same 409. On a kernel booted over the rows (registry hydrated with both), step 3 answered 404. Either way the save wrote a row the read did not serve.The save naming WA at fr-FR on main (in process and REST
PUT ?package=WA): 200, writes a new WA row at fr-FR, WD's row untouched, and the bare read then serves it (200 at WA). So the stop rule did not trigger; this head makes the bare save answer exactly that.Per-door conclusions at the cell (main → this head)
NO_DRAFT, equal to?package=WA).?package=WA).NO_DRAFT/404 and the bare discard the named-base receipt, all equal to?package=WA).historySlotOf's two-or-more guard). See Acceptance notes.Pins (new file) and controls
meta-bare-save-dependent-only-member-35524.test.ts, 10 tests:PUTand in-process save on a kernel booted over the rows: step 1 404; WD's row byte-identical before and after (every stored column); rows equal to the save naming WA; no package-unbound row; bare read 200 at WA,?package=WDstill WD's; and after a restart.?package=WAanswers;?package=WDpublishes it.WRITABLE_PACKAGE_REQUIREDnaming the base, as?package=BASE(was the same code naming the dependent).['saved fr', WA], equal to the read naming WA); (ii) the bare per-item publish after that save promotes WA's draft, outcome and rows equal topackageId: WA; (iii) with no WA draft, the bare draft read equals the named one (['unbound fr', null]), the bare publish equals the named one (NO_DRAFT, 404) and the bare discard result equals the named discard's (success,resetand receipt, name blanked), rows unchanged; (iv) a second bare draft save updates WA's draft, one WA draft row.Unchanged and green:
meta-disabled-holder-served-stack.test.ts(M1, M2, S2 untouched) andmeta-bare-write-doors-follow-base-34681.test.ts:Test Files 3 passed (3),Tests 182 passed (182)at 344fc14.Ablations (one per moved pin; mutation through scripts/ablation-replace.mjs, rebuild, dist preflight, restore to the HEAD blob)
const resolved = base ?? address.packageIdread asaddress.packageId): marker present in dist; tests 1, 2 and 5 red (Tests 3 failed | 3 passed (6)); restored, blob == HEAD,git diff HEADempty.packagelessRowHeldBaseDraftAddressreturning the stored address: tests 3 and 4 red (Tests 2 failed | 4 passed (6)), re-run on 80f540b with the same reading; restored, blob == HEAD.package=com.qa.authoredaddon(Tests 1 failed | 5 passed (6)); restored, blob == HEAD.Tests 6 passed (6).key !== nullexemption): superseded by this round; E puts it back as the ablation.draftAddressFollowsRowHeldBaseread asaddress.into !== null && address.key !== null, both callers at once): anchor x1 -> x0, marker present in 2 built files after the rebuild; test 7 (i) to (iv) red (Tests 4 failed | 6 passed (10): the bare draft save adopted the package-unbound draft into WD's draft, the bare publish then promoted the unbound draft into WD's row and answered 200, notNO_DRAFT). Restored, blob == HEAD (2c49e5ac9f32),git diff HEADempty, rebuilt, marker absent from all 24 built files.? draftAddress.intoread as? draftAddress.into && null): marker present in 2 built files; test 7 (iii) red alone (Tests 1 failed | 9 passed (10)), the bare receiptNo pending draft for email_template/NAME.against the named oneNo pending draft of email_template/NAME is bound to package 'com.qa.authoredbase', so nothing was discarded: its package-less draft remains.(the named-base answer, measured on this head). Restored, blob == HEAD (1c2294d6482b),git diff HEADempty, rebuilt, marker absent from all 24 built files.Tests 10 passed (10). E and F ran at 4f232bf; 344fc14 after it changes only a docblock, the changeset and the pin's added draft-read equality (a control of the read, which neither ablated guard decides; not re-ablated), so the guards E and F ablate are byte-identical at the final head.Acceptance notes
de-DEbeside a dependent'sfr-FRis the same cell), per the S1 review's ②.SaveMetaItemRequestSchema.packageId's sentence "anactivesave then writes the row of the one package the item's active rows are bound to" now has this cell as an exception at the member grain, androwHeldBaseAddressOf's docblock says the writes ask it only with two or more holders. Both are text for sibling card metadata-protocol: follow-ups from the #35450 contract review: the spec exception text, three door-request comments, and a rollback pin over real history #35529, which rewrites those descriptions; untouched here.RESOURCE_CONFLICT; observation only.Verification
Local runs at the final head 344fc14 (this round, contract review S2 option (b))
@objectstack/metadata-protocoltypecheck exit 0,@objectstack/runtimetypecheck (with its test-typecheck) exit 0, and the three files below, in one lock run at 344fc14:VERDICT command-exit 0.@objectstack/metadata-protocoltest at 4f232bf (344fc14 changes only a docblock in that package):Test Files 370 passed | 9 skipped (379),Tests 23417 passed | 45 skipped (23462).meta-bare-save-dependent-only-member-35524.test.ts,meta-bare-write-doors-follow-base-34681.test.ts,meta-disabled-holder-served-stack.test.ts:Test Files 3 passed (3),Tests 182 passed (182).dispatch-gates.mjs --commandsat 344fc14, 75 families, the same list as at 4f232bf): 75 exit 0 (check:type-check-debtunder the lock,re-measure: OK;check:dual-build-cjs-loadsmeasured over the dogfood closure's dist, 125 entry points load).--ran: 75 derived, 75 run, 0 NOT-MEASURED, 0 UNRUN.test:repo,pnpm lintand the full farm are CI's. Check-runs at 344fc14: 53, 37 success, 16 skipped, none failed (Check Changeset, PR-body guards, Test Core 1..10, TypeScript Type Check, Lint & Repo Gates, Dogfood Regression Gate, Governed Surface Queue Guard among them).os-verify-lock: VERDICT command-exit 0 · held the lock 2915s (48m35s),Test Files 487 passed | 3 skipped (490),Tests 4128 passed | 68 skipped (4196), no failures. Also green at 4f232bf (Tests 4128 passed | 68 skipped (4196)).🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAj3FYe91JCMQZPS88h